package com.gitee.andy.zpush.kernel;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;

public class Session4Client extends Session {
	private final Bootstrap bootstrap;
	private static final Logger log = LoggerFactory.getLogger(Session4Client.class);

	public Session4Client(Bootstrap bootstrap, Channel channel) {
		this.bootstrap = bootstrap;
		bind(channel);
	}

	
	public void reconnect(String inetHost, int inetPort){
		try {
			bind(bootstrap.connect(inetHost, inetPort).sync().channel());
		} catch (InterruptedException e) {
			log.error("", e);
		}
	}
}
